<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>monitor</title>
  </head>
  <body>
    <div id="container">
      <div class="content" style="width: 600px; word-wrap: break-word"></div>
    </div>
    <script>
      let content = document.getElementsByClassName("content")[0];
      // content.innerHTML = "@".repeat(10000);
      // DOM解析完成，即使依赖的资源没有加载完成，也会触发这个时间
      // document.addEventListener("DOMContentLoaded", () => {
      //   let start = Date.now();
      //   while (Date.now() - start < 1000) {}
      // });
      setTimeout(() => {
        let h1 = document.createElement("h1");
        h1.innerHTML = "FMP";
        h1.setAttribute("elementtiming", "meaningful");
        content.appendChild(h1)
      }, 2000);
      fetch('/success').then(res => res.json()).then(res=> {
        // console.log('fetch jsonRes', res)
      })
    </script>
  </body>
</html>
